var mongoose=require('mongoose');
//连接数据库
mongoose.connect('mongodb://dg:dg931120@localhost:27017/donggu');
mongoose.connection.on("connected",function () {
  console.log("数据库连接成功！")
});
mongoose.connection.on("error",function () {
  console.log("数据库连接失败！")
});

module.exports=mongoose;
